import moment from 'moment';
import { BLACK_ENUM } from './enum';
import { COOPERATION_ENUM } from '@/config/enum';

const formItemLayout = {
  labelCol: { span: 8 }, // 左侧 label 宽度
  wrapperCol: { span: 16 }, // 右侧 控件 宽度
  style: {
    marginBottom: 24,
  },
};

// 一行显示个数
const ColConfig = {
  xs: 24, // <576
  sm: 24, // >= 576
  md: 24, // >= 768
  lg: 12, // >= 992
  xl: 8, // >= 1200
  xxl: 6, // >= 1600
};

export const tableRadioCondition = [
  {
    title: '全部',
    number: 0,
    value: '',
    unit: '条',
    key: 'totalNum',
  },
  {
    title: '待审核',
    number: 0,
    value: '10',
    unit: '条',
    key: 'reviewedNum',
  },
  {
    title: '待质检',
    number: 0,
    value: '20',
    unit: '条',
    key: 'qualityNum',
  },
];

// 筛选1
export const filterCondition = [
  {
    inputType: 'select',
    title: 'channelId',
    label: '来源',
    // isAll: true,
    componentsConfig: {
      placeholder: '请选择',
      allowClear: false,
    },
    selectCondition: [{ label: '1号门店', value: 1 }],
    formItemLayout,
    ColConfig,
  },
  {
    inputType: 'input',
    title: 'skuCode',
    label: 'sku编码',
    componentsConfig: {
      placeholder: '请输入sku',
      maxLength: 20,
    },
    formItemLayout,
    ColConfig,
  },
  {
    inputType: 'input',
    title: 'name',
    label: '名称',
    componentsConfig: {
      placeholder: '请输入',
      maxLength: 20,
    },
    formItemLayout,
    ColConfig,
  },
  {
    inputType: 'select',
    title: 'filterType',
    label: '商品状态',
    isAll: true,
    componentsConfig: {
      placeholder: '请选择',
      allowClear: false,
    },
    selectCondition: [
      { label: '已添加', value: 1 },
      { label: '未添加', value: 2 },
    ],
    formItemLayout,
    ColConfig,
  },
];

// 筛选2
export const filterCondition2 = [
  {
    inputType: 'select',
    title: 'channelId',
    label: '来源',
    // isAll: true,
    componentsConfig: {
      placeholder: '请选择',
      allowClear: false,
    },
    selectCondition: [{ label: '1号门店', value: 1 }],
    formItemLayout,
    ColConfig,
  },
  {
    inputType: 'input',
    title: 'skuCode',
    label: 'sku编码',
    componentsConfig: {
      placeholder: '请输入',
      maxLength: 20,
    },
    formItemLayout,
    ColConfig,
  },
  {
    inputType: 'input',
    title: 'labelName',
    label: '标签名称',
    componentsConfig: {
      placeholder: '请输入',
      maxLength: 20,
    },
    formItemLayout,
    ColConfig,
  },
  // {
  //   inputType: 'input',
  //   title: 'skuName',
  //   label: '商品名称',
  //   componentsConfig: {
  //     placeholder: '请输入',
  //     maxLength: 20,
  //   },
  //   formItemLayout,
  //   ColConfig,
  // },
  {
    inputType: 'select',
    title: 'filterType',
    label: '商品状态',
    isAll: true,
    componentsConfig: {
      placeholder: '请选择',
      allowClear: false,
    },
    selectCondition: [
      { label: '已添加', value: 1 },
      { label: '未添加', value: 2 },
    ],
    formItemLayout,
    ColConfig,
  },
];
